{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from xtquant import xtdata\n",
    "\n",
    "table_list = ['Balance','Income','CashFlow','Capital','Top10FlowHolder','Top10Holder','HolderNum']\n",
    "\n",
    "res = xtdata.download_financial_data(stock_list=['600519.SH'], table_list=table_list)\n",
    "\n",
    "res\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from xtquant import xtdata\n",
    "\n",
    "table_list = ['Balance','Income','CashFlow','Capital', 'Top10FlowHolder','Top10Holder','HolderNum']\n",
    "\n",
    "def callback(data):\n",
    "\t\tprint(data)\n",
    "\n",
    "xtdata.download_financial_data2(stock_list=['600519.SH'], table_list=table_list, callback=callback)\n",
    "\n",
    "xtdata.run()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from xtquant import xtdata\n",
    "res = xtdata.get_financial_data(stock_list=['600519.SH'])\n",
    "\n",
    "res['600519.SH']['Balance']"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".venv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
